package cn.iocoder.yudao.module.product.spu.vo;

import cn.iocoder.yudao.framework.validation.InEnumValue;
import cn.iocoder.yudao.module.api.dine.enums.DineAttributeEnum;
import cn.iocoder.yudao.module.product.sku.vo.ProductSkuSaveReqVO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

@Schema(description = "用户 APP - 产品 SPU 新增/更新 Request VO")
@Data
public class AppProductSpuBasicSaveVO {

    @Schema(description = "产品编号", example = "1")
    private Long id;

    @Schema(description = "产品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "清凉小短袖")
    @NotEmpty(message = "产品名称不能为空")
    private String name;

    @Schema(description = "产品详情", example = "清凉小短袖详情")
    private String description;

    @Schema(description = "产品分类编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "产品分类不能为空")
    private Long categoryId;

    @Schema(description = "销售价，单位：分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1999")
    @NotNull(message = "销售价不能为空")
    private Integer price;

    @Schema(description = "产品封面图", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.example.com/xx.png")
    @NotEmpty(message = "产品封面图不能为空")
    private String picUrl;

    @Schema(description = "单位名称")
    private String unitName;

    @Schema(description = "每次加购数量", example = "1")
    private Integer stepQuantity;

    @Schema(description = "库存", example = "999")
    private Integer stock;

    @Schema(description = "菜肴属性：0-无、1-主食、2-荤菜、3-素菜、4-汤、5-调料、6-饮品、7-水果、20-锅底、50-套餐、98-餐盒、99-备注")
    @InEnumValue(DineAttributeEnum.class)
    private Integer dishAttribute;

    @Schema(description = "产品SKU信息")
    private List<ProductSkuSaveReqVO> skus;

}
